﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace MagicArenaXNA.Assets
{
    public class TestAssetHolder
    {
        private static TestAssetHolder _Instance;
        public static TestAssetHolder Instance { 
            get 
            {
                if (_Instance == null)
                    _Instance = new TestAssetHolder();
                return _Instance;
            } 
        }

        private TestAssetHolder() { }
        
        public void LoadContent(Game game)
        {
            Crono = game.Content.Load<Model>("Models\\Crono");
            Crono.Root.Transform = Crono.Root.Transform * Matrix.CreateScale(0.01f);
            Crono.Root.Transform = Crono.Root.Transform * Matrix.CreateTranslation(0, 2, 0);

            Lucca = game.Content.Load<Model>("Models\\Lucca");
            Lucca.Root.Transform = Lucca.Root.Transform * Matrix.CreateScale(0.01f);
            Lucca.Root.Transform = Lucca.Root.Transform * Matrix.CreateTranslation(0, 2, 0);

            UiBarBackground = game.Content.Load<Texture2D>("Gui\\Bar\\magic-arena-ui-bar-background");
            UiBarHealth = game.Content.Load<Texture2D>("Gui\\Bar\\magic-arena-ui-bar-health");
            UiBarMana = game.Content.Load<Texture2D>("Gui\\Bar\\magic-arena-ui-bar-mana");
            UiBarSpellFrame = game.Content.Load<Texture2D>("Gui\\Bar\\frame-8-grey");
            UiBarSpellOverlay = game.Content.Load<Texture2D>("Gui\\Bar\\magic-arena-ui-bar-spellnotready");

            
            FireSpell = game.Content.Load<Texture2D>("Gui\\Spells\\fireball-red-1");
            ShieldSpell = game.Content.Load<Texture2D>("Gui\\Spells\\protect-blue-2");
            HealSpell = game.Content.Load<Texture2D>("Gui\\Spells\\heal-jade-2");
            SummonSpell = game.Content.Load<Texture2D>("Gui\\Spells\\runes-orange-1");
            

        }

        public Model Crono { get; set; }
        public Model Lucca { get; set; }

        public Texture2D UiBarBackground { get; set; }
        public Texture2D UiBarHealth { get; set; }
        public Texture2D UiBarMana { get; set; }
        public Texture2D UiBarSpellFrame { get; set; }
        public Texture2D UiBarSpellOverlay { get; set; }

        public Texture2D FireSpell { get; set; }
        public Texture2D ShieldSpell { get; set; }
        public Texture2D HealSpell { get; set; }
        public Texture2D SummonSpell { get; set; }

    }
}
